#include <iostream>

using namespace std;

class animal {
public:
        int age;
        int sex;
        void eat(void) {cout << __func__ << "()" << endl;}
};

class dog : public animal {
public:
        void wang(void) {cout << __func__ << "()" << endl;}
};

class cat : public animal {
public:
        void miao(void) {cout << __func__ << "()" << endl;}
};

int main()
{
        animal a;

        a.age = 6;
        cout << a.age << endl;

        dog wangcai;

        wangcai.age = 7;
        cout << wangcai.age << endl;
        wangcai.eat();
        wangcai.wang();
        //wangcai.miao();

        return 0;
}
